cmake_minimum_required (VERSION 2.8)

project (Demo1)
add_executable(Demo main.cc)


# [ehome@codingce Demo1]$ cmake .
# -- The C compiler identification is GNU 4.8.2
# -- The CXX compiler identification is GNU 4.8.2
# -- Check for working C compiler: /usr/sbin/cc
# -- Check for working C compiler: /usr/sbin/cc -- works
# -- Detecting C compiler ABI info
# -- Detecting C compiler ABI info - done
# -- Check for working CXX compiler: /usr/sbin/c++
# -- Check for working CXX compiler: /usr/sbin/c++ -- works
# -- Detecting CXX compiler ABI info
# -- Detecting CXX compiler ABI info - done
# -- Configuring done
# -- Generating done
# -- Build files have been written to: /home/ehome/Documents/programming/C/power/Demo1
# [ehome@codingce Demo1]$ make
# Scanning dependencies of target Demo
# [100%] Building C object CMakeFiles/Demo.dir/main.cc.o
# Linking C executable Demo
# [100%] Built target Demo
# [ehome@codingce Demo1]$ ./Demo 5 4
# 5 ^ 4 is 625
# [ehome@codingce Demo1]$ ./Demo 7 3
# 7 ^ 3 is 343
# [ehome@codingce Demo1]$ ./Demo 2 10
# 2 ^ 10 is 1024